package com.aaa.rent.controller.api;

import com.aaa.rent.service.BaseAreaService;
import com.aaa.security.annotation.MyLog;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 荆豪峰
 * @version 1.0
 * #Date: 2023/3/2 09:15
 */
@Api(value = "rent/basearea", tags = {"#Date: 2023/3/2 09:15"})
@RestController
@RequestMapping("rent/basearea")
public class ApiBaseAreaController {
    @Autowired
    private BaseAreaService baseAreaService;
    /**
     * #Description 查询地区信息
     * @param parentid
     * @return com.aaa.vo.Result
     * @author 荆豪峰
     * #Date 2023/3/2
     */
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "parentid", value = "", required = true)
    })
    @ApiOperation(value = "#Description 查询地区信息 #Date 2023/3/2", notes = "#Description 查询地区信息 #Date 2023/3/2", httpMethod = "POST")
    @MyLog(title = "查询地区信息")
    @PostMapping("list")
    public Result list(@RequestParam Integer parentid){
        return baseAreaService.listName(parentid);
    }
}
